package datastructure
{
	/**
	 * 边的定义类 
	 * @author juxuan
	 * 
	 */	
	public class Edge
	{
		
		public var startVer:Vertex;	//边的开始顶点
		public var endVer:Vertex;	//边的结束顶点
		public var weight:int;	//权重
		
		
		public function Edge(...args)
		{
			if(args.length == 3)
			{
				this.initEdge1(args[0],args[1],args[2]);
			}
			else
			{
				this.initEdge0();
			}
		}
		
		
		
		private function initEdge0():void
		{
			this.startVer = null;
			this.endVer = null;
			this.weight = int.MAX_VALUE;
		}
		
		
		private function initEdge1(sv:Vertex,ev:Vertex,w:int):void
		{
			this.startVer = sv;
			this.endVer = ev;
			this.weight = w;
		}
		
		
		
	}
}